Skip to content

feat:Added collection name and minor UI changes to the generate doc modal#8391

Open
sachin-bruno wants to merge 4 commits into
usebruno:mainfrom
sachin-bruno:sachin-bruno/feature-environment-selection
Open

feat:Added collection name and minor UI changes to the generate doc modal#8391
sachin-bruno wants to merge 4 commits into
usebruno:mainfrom
sachin-bruno:sachin-bruno/feature-environment-selection

Conversation

@sachin-bruno

@sachin-bruno sachin-bruno commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

Problem
Generated documentation includes every environment in the collection, with no way to scope which envs ship, so internal, local, or staging envs leak into docs shared externally. The modal also doesn't surface which collection version the docs represent. Added collection name as well.

https://usebruno.atlassian.net/browse/BRU-2542

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.
image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • The Generate Documentation modal now displays the collection name alongside version details.
    • Version display now shows the raw version text in a consistent version : <value> format.
  • UI Improvements

    • Folder, request, and environment counts are now presented as clearer, separate values with improved grammar and spacing (including a 0 environments message).
    • The environment selection list shows one additional row at a time.
  • Tests

    • Updated modal and component assertions to match the new labels and formatting.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 00a08d06-a102-4848-bc5a-5e1718a66c15

📥 Commits

Reviewing files that changed from the base of the PR and between 1546bdc and 96b75fa.

📒 Files selected for processing (1)
  • tests/utils/page/locators.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/utils/page/locators.ts

Walkthrough

CollectionVersionInfo now shows the collection name, raw version text, split folder/request counts, and conditional environment text. The modal passes the new props through, removes its fixed width class, and related styles and tests were updated.Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • usebruno/bruno#6583: Touches the same GenerateDocumentation modal flow and shared styling.
  • usebruno/bruno#8268: Updates the same CollectionVersionInfo component and its rendered modal output.

Suggested reviewers: bijin-bruno, lohit-bruno, naman-bruno, sid-bruno

Poem

A name steps in, the version stands clear,
folders and requests now split in cheer.
One quiet dot for empty space,
and rows align with tidier grace.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by mentioning the collection name and UI updates to the generate docs modal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js (1)

33-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

.collection-name needs truncation rules to back up min-width: 0.

min-width: 0 only enables shrinking — on its own it does nothing visible. A long collection name will wrap or push the nowrap version off the line. Add ellipsis truncation to finish the job.

♻️ Proposed fix
         .collection-name {
           font-weight: 500;
           font-size: ${(props) => props.theme.font.size.base};
           color: ${(props) => props.theme.text};
           min-width: 0;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js`
around lines 33 - 38, The .collection-name style in StyledWrapper only sets
min-width: 0, which allows shrinking but does not truncate long text. Update the
collection-name rule to include the usual ellipsis truncation behavior so long
names do not wrap or overflow; keep the fix scoped to the collection-name
selector in StyledWrapper.js.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js`:
- Around line 33-38: The .collection-name style in StyledWrapper only sets
min-width: 0, which allows shrinking but does not truncate long text. Update the
collection-name rule to include the usual ellipsis truncation behavior so long
names do not wrap or overflow; keep the fix scoped to the collection-name
selector in StyledWrapper.js.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 110aa513-11ef-4a54-bf1a-8fee93cc212b

📥 Commits

Reviewing files that changed from the base of the PR and between 30b4512 and b918dbe.

📒 Files selected for processing (7)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/EnvironmentSelectionList/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts
  • tests/utils/page/locators.ts

@pull-request-size pull-request-size Bot added size/M and removed size/L labels Jun 26, 2026
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js`:
- Around line 11-12: The version display in CollectionVersionInfo is adding a
prefixed label instead of showing the raw collection version. Update the render
logic in the version-value span so it outputs the version prop verbatim,
matching the value passed from the modal, and keep the existing conditional
around version in place.

In
`@packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js`:
- Around line 7-38: Add a test in CollectionVersionInfo’s spec to cover the new
collection name element rendered by CollectionVersionInfo, since the current
suite only checks version and summary text. Update index.spec.js to assert the
presence and content of the collection-name output for a rendered name prop, and
include a negative/edge case if the component hides it conditionally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9fb0ef94-613a-4063-a17a-26f23d0cbabc

📥 Commits

Reviewing files that changed from the base of the PR and between b918dbe and 1546bdc.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants